# test event/script registration

my @events = qw(
	OnBeforeCycle OnAfterCycle
	OnNewDocument OnAppClose OnDocSelected OnFirstEditorCreated
	OnSchemeChange OnDocClosing OnAfterLoad OnBeforeSave
		OnAfterSave OnModifiedChanged OnWriteProtectChanged
	OnCharAdded
);

for my $event (@events) {
	PlPN->RegisterEvent($event, sub {
		PlPN->alert(join("\n", $event, @_));
	});
}

PlPN->RegisterScript('test', sub { PlPN->alert('Test') });
PlPN->RegisterScript('test', 'test', sub { PlPN->alert('Test') });
